#!/bin/sh

# src/tools/hgchange/hg_change

# error func
err_func()
{
	EXCODE=$?
	if [ "$EXCODE" -ne "0" ]; then
		echo "stop before sucess!";
		exit 1
	fi
}

# Change the configure.in and configure file
echo "Do:Change version string"
src/tools/hg/hg_version_stamp.pl beta1
err_func;
rm configure
autoconf configure.in > configure
err_func;
chmod +x configure
# Change hg-psql and hg-postgres
src/tools/hg/hg_native_client_utilities.pl
err_func;
# Add copyright string to every file
echo "Do:Adding copyright and wait about 2 minites please..."
src/tools/hg/hg_add_copyright.pl
err_func;
# Replace pg bug-site to hg bug-site
echo "Do:Replace bug-site and wait about 2 minites please..."
src/tools/hg/replace_bug_site.pl
err_func;
echo "Do:Change done."
